﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Universum.Infrastructure.Utils;
using Db4objects.Db4o;

namespace Universum.Infrastructure.Persistence
{
	public class Db4oUnitOfWork : IDb4oUnitOfWork
	{

		#region IDb4oUnitOfWork Members

		public IObjectContainer Client
		{
			get { return Db4oHttpModule.Client; }
		}

		#endregion

		#region IUnitOfWork Members

		public void Initialize()
		{
			
		}

		public void Commit()
		{
			Client.Commit();
		}

		public void Rollback()
		{
			Client.Rollback();
		}

		#endregion

		#region IDisposable Members

		public void Dispose()
		{
			Client.Dispose();
		}

		#endregion
	}
}
